package com.hongning.railway.entity.reqbean;

import com.hongning.railway.util.GsonUtil;

import okhttp3.RequestBody;

public class BaseReqBean {

    public String toJson(){
        return GsonUtil.GsonString(this);
    }

    public RequestBody toRequestBody(){
        RequestBody body=RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"),this.toJson());
        return body;
    }
}
